package unversioned;

/**
 * @since Oct 20, 2017
 */
public class LocalClassTest {
    private String CHINA_PHONE_PREFIX = "86";

    public void test() {

        class PhoneNumber {
            String phone = null;

            PhoneNumber(String phone) {
                this.phone = phone;
            }

            String CHINA_PHONE_PREFIX = "88";

            boolean isValidChinaPhone() {
                return this.phone.startsWith(CHINA_PHONE_PREFIX);
            }
        }

        PhoneNumber phone1 = new PhoneNumber("86-13333333333");
        System.out.println(phone1.isValidChinaPhone());
    }

    public static void main(String[] args) {
        LocalClassTest test = new LocalClassTest();
        test.test();
    }

}
